package com.xcity.game.combat.listener.combat;

import com.xcity.db.entity.Player;
import com.xcity.game.combat.Combat;
import com.xcity.game.combat.listener.CombatListener;
import com.xcity.game.peakroad.PeakRoadCombatListener;
import com.xcity.game.worldboss.combat.WorldBossCombatListener;

public class CombatListenerFactory {

	public static CombatListener create(Player player, Combat.Type type) {
		if (type == Combat.Type.PVP) {
//			return new PVPCombatListener();
			return new PVPCombatListenerV2();
		}
		if (type == Combat.Type.PVE) {
			return new PVECombatListener();
		}
		if (type == Combat.Type.ARENA_OFFLINE) {
			return new ArenaOfflineCombatListener();
		}
		if (type == Combat.Type.RESOURCE_INSTANCE){
			return new ResStageCombatListener();
		}
		if (type == Combat.Type.PEAK_ROAD) {
			return new PeakRoadCombatListener();
		}
		if (type == Combat.Type.MINE_TAKE) {
			return new MineTakeCombatListener();
		}
		if (type == Combat.Type.MINE_ATTACK) {
			return new MineAttackCombatListener();
		}
		if (type == Combat.Type.WORLD_BOSS) {
			return new WorldBossCombatListener();
		}
		return null;
	}
	
}
